<?php

require_once 'common.inc.php';
!in_array('2',$larr)&&adminmsg('你没有被赋予操作该项的权限！');

require_once '../allconfig.inc.php';

if('list'==$action){
	include 'templates/msystem/db.htm';
}elseif('edit'==$aciton){
	echo "OK";

	//$result=readover('../allconfig.inc.php');
	//echo $result;




	//adminmsg('修改成功', 'config_set.inc.php');
}



function readover($filename, $method = "rb") {
	if ($handle = @fopen($filename, $method)) {
		flock($handle, LOCK_SH);
		$filedata = fread($handle, filesize($filename));
		fclose($handle);
	} 
	return $filedata;
} 
function writeover($filename, $data, $method = "rb+", $iflock = 1) {
	touch($filename);
	$handle = fopen($filename, $method);
	if ($iflock) {
		flock($handle, LOCK_EX);
	} 
	$show = fputs($handle, $data);
	if ($method == "rb+") ftruncate($handle, strlen($data));
	fclose($handle);
	return $show;
}

?>